#include <stdio.h>
int main(int argc, char * argv[])
{
	FILE * fh = fopen("message", "w");
	if (fh == NULL) 
	{
		printf("fopen fail\n");
		return -1; /* abnormal termination */
	}
	fprintf(fh, "This is a message.\n");
	fprintf(fh, "Another line.\n");
	fclose(fh);
    return 0;
}
